﻿<%@ Page Title="" Language="C#" MasterPageFile="~/TimKenSite.Master" AutoEventWireup="true" CodeBehind="Category.aspx.cs" Inherits="TimKen.Web.Category" %>
<%@ Register Src="UserControls/ProductResources.ascx" TagName="ProductResources"
    TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="Common/Style/common.css" rel="stylesheet" type="text/css" />
    <link href="Common/Style/PagerStyle.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(function () {
            $(".nav_li").hover(function () {//鼠标放上去时候的效果
                $(this).children("a").addClass("navon"); //鼠标放上去的加上高亮
                $(this).children("div").show(); //鼠标放上去的二级栏目出来
                $(this).siblings().children("a").removeClass("navon"); //其他的高亮取消
                $(".common_search_tk").css("position", "static");
                $(".common_search_tkicon").hide();
            }, function () {//鼠标移开时候的效果
                $(this).children("a").removeClass("navon"); //鼠标移开去掉高亮
                $(this).children("div").hide(); //鼠标移开隐藏二级栏目
                $(".common_search_tk").css("position", "relative");
                $(".common_search_tkicon").show();
                $(".nav_li:eq(2)").children("a").addClass("navon"); //回到当前栏目高亮
            });
        });
        $(document).ready(function () {
            $(".nav_li:eq(2)").children("a").addClass("navon").parent().siblings().children("a").removeClass();
            $(".left_nav ul li:eq(0)").children("a").addClass("left_navon"); //左侧导航，当前栏目高亮	
        });
        window.onload = function () { for (var ii = 0; ii < document.links.length; ii++) document.links[ii].onfocus = function () { this.blur() } }

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="server">
    <uc1:ProductResources ID="ProductResources1" runat="server" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="body" runat="server">
    <div class="apply_box common_border">
        <asp:DataList ID="dlCategory" runat="server" RepeatColumns="4" ItemStyle-HorizontalAlign="Left"
            EnableViewState="False" RepeatDirection="Horizontal">
            <ItemTemplate>
                <ul class="apply_box_ul">
                    <h1>
                        <%#GetSubString(Eval("CategoryName").ToString(), 22)%></h1>
                    <h2>
                        <a href='ChildCategory.aspx?cid=<%#Eval("CategoryID")%>&brandid=<%=brandid %>'><img src="<%#pcm.GetCategoryImage(int.Parse(Eval("CategoryID").ToString()))%>" width="160" height="160" border="0"/></a> 
                    </h2>
                    <p>
                        <%#GetSubString(Eval("Description").ToString(),58)%>
                    </p>
                </ul>
            </ItemTemplate>
        </asp:DataList>
    </div>
</asp:Content>
